Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Rounding problem in modification by formula with 100 percentage #548

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

thangqp
Copy link
Contributor

@thangqp thangqp commented Oct 15, 2024

Code actual : result = value1 * (value2 / 100)
value1 = 100, value2 = 127.4000015258789

jshell> 100.0d *(127.4000015258789d /100)
$1 ==> 127.40000152587892 (2 added at the end)

Code modified : result = (value1 / 100) * value2

jshell> (100.0d /100) *127.4000015258789d
$2 ==> 127.4000015258789 (without 2)

Solution: See with PO, the first operand is used to edit a percentage

Copy link

@thangqp thangqp removed the request for review from dbraquart October 15, 2024 08:41
@thangqp thangqp merged commit c07e297 into main Oct 15, 2024
3 checks passed
@thangqp thangqp deleted the fix_rounding_formula branch October 15, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants